import static java.lang.System.out;

public class Test {

	public static void main(String args[]) {
		final String BEAKER ="_______________________\n";
		
		out.println("Create Transporter");
		BigAnimal[] first_animals = new BigAnimal[2];
		first_animals[0]=new Elephant("BigAnimal0");
		first_animals[1]=new Giraffe("BigAnimal1");
		Transporter first = new Transporter(first_animals, new SmallTurtleTerrarium());
		out.append(first.list());
		out.append(BEAKER);
		
		out.println("Create Trailer0");
		BigAnimal[] second_animals = new BigAnimal[3];
		second_animals[0]=new Elephant("BigAnimal2");
		second_animals[1]=new Giraffe("BigAnimal3");
		second_animals[2]=new Elephant("BigAnimal4");
		Trailer second = new Trailer(second_animals, new WaterTank());
		out.append(second.list());
		out.append(BEAKER);
		
		out.println("Create Trailer1");
		BigAnimal[] third_animals = new BigAnimal[1];
		third_animals[0]=new Giraffe("BigAnimal5");
		Trailer third = new Trailer(second_animals, new SmallTurtleTerrarium());
		out.append(third.list());
		out.append(BEAKER);
		
		out.println("Create Trailer2");
		Trailer fourd = new Trailer(null, new BigTurtleTerrarium());
		out.append(fourd.list());
		out.append(BEAKER);
		
		out.println("LoadAnimal0");
		Animal smallturtle = new SmallTurtle("SmallTurtle0");
		if(first.load(smallturtle)) {
			out.println("OK");
		}
		out.append(first.list());
		out.append(BEAKER);
		
		out.println("LoadAnimal1");
		Animal dolphin = new Dolphin("Dolphin0");
		if(second.load(dolphin)) {
			out.println("OK");
		}
		out.append(second.list());
		out.append(BEAKER);
		
		out.println("LoadAnimal2");
		Animal pyhon = new Python("Python0");
		if(!third.load(pyhon)) {
			out.println("FAIL");
		}
		out.append(third.list());
		out.append(BEAKER);
		
		out.println("LoadAnimal3");
		Animal giraffe = new Giraffe("Giraffe0");
		if(!fourd.load(giraffe)) {
			out.println("FAIL");
		}
		out.append(fourd.list());
		out.append(BEAKER);
		
		out.println("Conect all together:");
		first.load(second);
		second.load(third);
		third.load(fourd);
		out.println(first.list());
		out.append(BEAKER);
		
		out.println("UnLoadTrailer:");
		out.println(second.unLoad());
		out.println(first.list());
		out.append(BEAKER);
		
		out.println("Conect to Transporter an other Transporter");
		Transporter test = new Transporter(null, new PythonTerrarium());
		if(!test.load(new Transporter(null, new WaterLandTank()))){
			out.println("FAIL");
		}
		out.println(test.list());
		out.append(BEAKER);

	}
	
}
